<template>
    <view class="winning_info">
        <view class="br2" @click="jumpPage('/packages/allLotteries/index')">
            <p>{{ winInfo.all_task || 0 }}</p>
            <p>全部抽奖</p>
        </view>
        <view class="br2" @click="jumpPage('/pages/myactivity/myactivity')">
            <p>{{ winInfo.publish_task || 0 }}</p>
            <p>发起抽奖</p>
        </view>
        <view class="br2" @click="jumpPage('/packages/winnrecord/index')">
            <p>{{ winInfo.win_num || 0}}</p>
            <p>中奖记录</p>
        </view>
    </view>
</template>
<script>
export default {
    data() {
        return {
            winInfo: {}
        }
    },
    methods: {
        init() {
            uni.$http.get('/public/myTaskData').then(res => {
                this.winInfo = res.data.data;
            })
        },
        jumpPage(url) {
            uni.navigateTo({ url })
        }
    },
    created() {
        this.init();
    }
}
</script>
<style lang="scss" scoped>
.winning_info {
    display: flex;
    flex-wrap: nowrap;
    height: 100rpx;
    width: 100%;
    justify-content: space-between;
    // border-top: 2rpx solid #C7C7C7;
    padding: 10rpx 0;
    .br2 {
        flex-grow: 1;
        border-right: 2rpx solid #C7C7C7;
        text-align: center;
        font-size: 28rpx;
        &:last-child {
            border: none;
        }
        p {
            line-height: 50rpx;
        }
    }
}
</style>